package com.hoshiicloud.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 删除状态常量类 0-未删除 1-已删除
 *
 * @author MARK
 */
@AllArgsConstructor
public enum DeleteStatusEnum {

    /**
     * 删除
     */
    DELETED(1, "已删除"),
    /**
     * 未删除
     */
    UN_DELETED(0, "未删除");

    @Getter
    private int code;

    @Getter
    private String name;

    public static DeleteStatusEnum get(int code) {
        for (DeleteStatusEnum aparameterStatus : values()) {
            if (aparameterStatus.getCode() == code) {
                return aparameterStatus;
            }
        }
        return null;
    }

}
